<%--
  Created by IntelliJ IDEA.
  User: zhangyuan
  Date: 2020-03-12
  Time: 15:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>文章</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=10,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/css/email/writeMail.css"/>
    <script src="/js/common/language.js"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.ui.widget.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.iframe-transport.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jQuery-File-Upload-master/jquery.fileupload.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layer/layer.js?20201106" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/ueditor.config.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/ueditor.all.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/UEcontroller.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/email/writeMail.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/ajaxupload.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/jquery.form.min.js"></script>
    <script type="text/javascript" src="../js/spirit/qwebchannel.js"></script>
    <script type="text/javascript" src="/js/common/fileupload.js"></script>
    <style>
        .files a{text-decoration: none;}
        a{
            text-decoration: none;
            color: #207BD6;
            cursor: pointer;
        }
        #attention{
            margin: 0;
            padding:0;
            list-style: none;
            width:100px;
            position: absolute;
            left: 10px;
            text-align: center;
            display: none;
            z-index: 9999;
            border:#ccc 1px solid;
            top:20px;
        }
        #attention li{
            background: #ffffff;
            cursor:pointer;
            line-height: 22px;
        }
        #attention li:hover{
            background-color: #6ea1d5;
            color: #fff;
        }
        .choose{
            width: 180px;
            position: absolute;
            left: 255px;
            top: 0px;
        }
        .bar {
            height: 18px;
            background: green;
        }
        .box{width:200px; height:20px; }
        .tbox{width:200px; height:20px; background:url(/img/email/bak.png) no-repeat;background-size: 100% 100%;}
        .tbox div{width:0px; height:20px; background:url(/img/email/pro.png) no-repeat;background-size: 100% 100%;text-align:center;font-size:14px; line-height:20px;}

        .threadflow {
            BORDER-RIGHT: #cad9ea 1px solid;
            BORDER-TOP: #cad9ea 1px solid;
            BACKGROUND: #f7f7f7;
            FLOAT: left;
            BORDER-LEFT: #cad9ea 1px solid;
            COLOR: #999;
            LINE-HEIGHT: 22px;
            BORDER-BOTTOM: #cad9ea 1px solid;
            HEIGHT: 20px;
            width: 20%;
        }

        .SmallButton {
            background-color: #fafafa;
            background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa), color-stop(100%, #f1f1f1));
            background: -webkit-linear-gradient(top, #fafafa, #f1f1f1);
            background: -moz-linear-gradient(top, #fafafa, #f1f1f1);
            background: -o-linear-gradient(top, #fafafa, #f1f1f1);
            background: linear-gradient(top, #fafafa, #f1f1f1);
            filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#fff1f1f1',GradientType=0);
            filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
            border: 1px solid #ddd;
            -webkit-border-radius: 3px;
            -moz-border-radius: 3px;
            -ms-border-radius: 3px;
            -o-border-radius: 3px;
            border-radius: 3px;
            height: 21px;
            line-height: 13px;
            padding: 2px 6px;
            font-size: 13px;
            color: #333;
            margin: 1px;
            text-decoration: none;
            text-align: center;
            cursor: pointer;
            -webkit-appearance: none;
        }
    </style>
</head>
<body>

<%--上下主题--%>
<%--<div class="threadflow" style="width:153px; height:25px;padding-top:3px; margin-bottom:5px; margin-left: 50px; margin-top: 30px;">
    <a href="javascript:;" style="margin-left: 5px;">上一主题 </a> |

    <a href="javascript:;"> 下一主题</a>
</div>--%>

<%--文章内容--%>
<table name="contentTab" class="TABLE" border="1"  style="border-collapse: collapse; margin-top: 30px;">
    <tr class="append_tr" style="background: #D9EDF7">
        <td  width="15%" style="padding-left: 10px; border-right: none;">

        </td>
        <td width="2%" style="padding-left: 10px; border-left: none;">
            <input onclick="showYn(1)" name="showYn" type="button" value="锁贴" class="SmallButton">
            <input type="button" value="返回" class="SmallButton articleBack">
        </td>
    </tr>
</table>

<%--上下主题--%>
<%--<div class="threadflow" style="width:153px; height:25px;padding-top:3px; margin-bottom:5px; margin-left: 50px; margin-top: 30px;">
    <a href="javascript:;" style="margin-left: 5px;">上一主题 </a> |

    <a href="javascript:;"> 下一主题</a>
</div>--%>

<%--快速回复主题--%>
<table class="TABLE" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;margin-bottom: 20px;margin-top: 30px">
    <%--标题--%>
    <tr class="append_tr">
        <td width="15%" style="padding-left: 10px;">标题:</td>
        <td width="85%">
            <input type="text" id="titleName" style="width: 70%;" class="input_txt">
        </td>
    </tr>

    <%--分类 table-row--%>
    <tr class="append_tr" style="display: none">
        <td width="15%" style="padding-left: 10px;">分类:</td>
        <td width="85%">
            <select name="type" style="width: 30%;height: 25px;margin: 5px;">

            </select>
        </td>
    </tr>



    <%--内容--%>
    <tr>
        <td width="15%" style="padding-left: 10px;">
            <p>内容:</p>
            <p class="Color"><a href="javascript:;" onclick="empty()"><fmt:message code="global.lang.empty" /></a></p>
        </td>
        <td width="85%">
            <scrtpt id="container" style="width: 99.9%;min-height: 300px;" name="content" type="text/plain"></scrtpt>
        </td>
    </tr>
    <%--附件文档 暂时隐藏--%>
    <tr class="Attachment" style="width:100%; padding-left: 10px; display: none;">
        <td width="15%">附件文档:</td>
        <td width="85%"   class="files" id="files_txt">
            <div id="fileContent"></div>
        </td>
    </tr>
    <%--附件选择 暂时隐藏--%>
    <tr style="display: none">
        <td width="15%" style="padding-left: 10px;">附件选择:</td>
        <td width="85%" class="files" style="position: relative">
            <!-- <fmt:message code="email.th.addfile" /> -->
            <form id="uploadimgform" style="float: left;" target="uploadiframe"  action="/upload?module=email"  method="post" >
                <input type="file" multiple="multiple" name="file"  id="uploadinputimg"  class="w-icon5" style="position: absolute;opacity: 0;width: 70px;filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0)">
                <a href="#" id="uploadimg"><img style="margin-right:5px;" src="../img/icon_uplod.png"/><fmt:message code="global.th.fileup" /></a>
            </form>
            <%--<a href="javascript:;" onclick="formFile()" style="float: left;margin: 0 15px;"><img style="margin-right:5px;" src="../img/icon_uplod.png"/>从文件柜选择附件</a>--%>
            <div id="progress" style="width: 200px;float: left;margin-left: 10px;margin-top: 2px;">
                <div class="bar" style="width: 0%;"></div>
            </div>
            <div class="barText" style="float: left;margin-left: 10px;"></div>
        </td>
    </tr>
    <%--署名--%>
    <tr>
        <td width="15%" style="padding-left: 10px;">签名档:</td>
        <td width="85%" class="remind">
            <div class="news_t">
                <input type="checkbox" name="nameRemind" class="remindCheck" value="1" checked > 附加签名档
            </div>
        </td>
    </tr>

    <%--事务提醒讨论区人员--%>
    <tr>
        <td width="15%" style="padding-left: 10px;">事务提醒讨论区人员:</td>
        <td width="85%" class="remind">
            <div class="news_t">
                <input type="radio" name="thingRemind" class="thingRemind" value="0" checked >提醒本站人员
                <input type="radio" name="thingRemind" class="thingRemind" value="1" checked >手动选择被提醒人员
                <span>&nbsp;</span>
                <input type="radio" name="thingRemind" class="thingRemind" value="2"  >提醒全部有权限
                <div name="senduser">
                    <textarea name="txt" id="senduser" user_id='' style="min-width: 70%;" value="" disabled></textarea>
                    <span class="add_img" style="margin-left: 10px">
							<a href="javascript:;" id="selectUser" class="Add "><fmt:message code="global.lang.add" /></a>
						</span>
                    <span class="add_img">
							<a href="javascript:;" class="clear"><fmt:message code="notice.th.delete1" /></a>
						</span>
                </div>
            </div>

        </td>
    </tr>

    <%--事务提醒--%>
    <tr style="height: 44px">
        <td class="blue_text" width="20%">
            <fmt:message code="notice.th.reminder"/>：
        </td>
        <td width="80%" style="text-align: left" id="thing">
            <input type="checkbox" class="remind" value="0">
            <span><fmt:message code="notice.th.remindermessage"/></span>
            <%--<input type="hidden" name="howRenind" >&nbsp;--%>
            <input type="checkbox" class="smsRemind" value="1" style="margin-left: 15px;">
            <span><fmt:message code="vote.th.UseRemind"/></span>
            <%--<input type="hidden" name="smsDefault" value="1">--%>
        </td>
    </tr>

    <%-- 保存按钮 --%>
    <tr>
        <td colspan="2">
            <div class="div_btn">
                <div class="sureBtn" id="pushBbs"><span style="margin-left: 30px;">发表帖子</span></div>
                <div class="saveBtn" id="fanhui"><span style="margin-left: 33px;">返回</span></div>

            </div>
        </td>
    </tr>
</table>

<script type="text/javascript">
    function getQueryString(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null)return  unescape(r[2]); return null;
    }
    var commentId=getQueryString("commentId");
    var boardIdUrl=getQueryString("boardId");
    var isCheck=getQueryString("isCheck");
    var boardId='';
    var type='';

    var uid = $.GetRequest().uid|| '';
    var uname = $.GetRequest().uname|| '';
    var attach_id='';
    window.console = window.console || (function(){
        var c = {}; c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile = c.clear = c.exception = c.trace = c.assert = function(){};
        return c;
    })();

    //当浏览器窗口改变时，根据浏览器窗口大小重新定义表格宽高
    $(window).resize(function() {
        $('.TABLE').width($(document).width()-100);
        $('.TABLE').height($(document).height()-100);
    });
    //返回
    $('.articleBack').click(function () {
        window.location.href="/bbs/theme?boardId="+boardIdUrl;
    })
    //底部返回
    $('#fanhui').click(function () {
        window.location.href="/bbs/theme?boardId="+boardIdUrl;
    })
    //			附件上传方法
    fileuploadFn('#uploadinputimg',$('.Attachment td').eq(1));

    //			从文件柜上传文件
    function formFile() {
        attach_id='fileContent';
        //$.popWindow("/email/formFileCabinet");
    }

    //事务提醒单选框监听事件
    $("input[name='thingRemind']").click(function(){
        var val=$('input:radio[name="thingRemind"]:checked').val();
        if(val==='0' || val=='1'){
            $('div[name="senduser"]').css("display","block");
        }else{
            $('#senduser').attr('user_id','');
            $('#senduser').attr('username','');
            $('#senduser').val('');
            $('div[name="senduser"]').css("display","none");
        }
    });

    //选人控件
    $("#selectUser").on("click",function(){
        user_id='senduser';
        $.popWindow("../common/selectUser");
    });

    $(document).delegate('.clearBCC', 'click', function () {
        $('#secritText').attr('username', '');
        $('#secritText').attr('dataid', '');
        $('#secritText').attr('user_id', '');
        $('#secritText').attr('userprivname', '');
        $('#secritText').val('');
    })
    $(document).delegate('.clearCC', 'click', function () {
        $('#copeNameText').attr('username', '');
        $('#copeNameText').attr('dataid', '');
        $('#copeNameText').attr('user_id', '');
        $('#copeNameText').attr('userprivname', '');
        $('#copeNameText').val('');
    })

    //附件删除
    $('#files_txt').on('click', '.deImgs', function () {
        var data = $(this).parents('.dech').attr('deUrl');
        var dome = $(this).parents('.dech');
        deleteChatment(data, dome);
    });

    $('#pushBbs').on('click', function(){
        saveBbs();
    })

    //清空UE内容
    function empty(){
        ue.setContent('');
    }

    //锁帖
    function showYn(showYn) {
        $.post("/bbs/updateCom",{commentId:commentId,showYn:showYn},function (res) {
            if(res.flag){
                layer.msg('修改成功！',{icon:1});
                $('input[name="showYn"]').val("锁帖");
                $('.tool').show()
                window.location.reload()
            }
        });

    }

    //编辑
    function bianji() {
        layer.open({
            type: 2
            ,title: ['编辑', 'font-size:18px;']
            ,maxmin:true
            ,area: ['90%', '90%']
            ,content: '/bbs/allNotice?boardId='+boardIdUrl+'&commentId='+commentId
            ,btn:['保存','关闭']
            ,btnAlign: 'c'
            ,yes: function(index, layero){
                //按钮【按钮一】的回调
                var iframeWin = window[layero.find('iframe')[0]['name']];
                iframeWin.editOver();
                layer.close(index)
                window.location.reload()
            }
        });
    }
    //回复
    function revert() {
        layer.open({
            type: 2
            ,title: ['编辑', 'font-size:18px;']
            ,maxmin:true
            ,area: ['90%', '90%']
            ,content: '/bbs/revert?boardId='+boardIdUrl+'&commentId='+commentId
            ,btn:['保存','关闭']
            ,btnAlign: 'c'
            ,yes: function(index, layero){
                //按钮【按钮一】的回调
                var iframeWin = window[layero.find('iframe')[0]['name']];
                iframeWin.save();
                layer.close(index)
                window.location.reload()
            }
        });
    }
    //删除
    function shanchu(id) {
        layer.confirm('确认要删除该条数据吗？', function(index){
            $.post('/bbs/delCom',{commentIds:id},function(res){
                layer.msg('删除成功！',{icon:1, time: 2000}, function(){
                    layer.close(index)
                    window.location.reload()
                });
            });
        });
    }

    function shield(id,show) {
        var status='';
        if(show==0){
            status=1
        }else{
            status=0
        }
        layer.confirm('确认要操作该条数据吗？', function(index){
            $.post('/bbs/updatefine',{ids:id,Field:'SHOW_YN',status:status},function(res){
                layer.msg('屏蔽成功！',{icon:1, time: 2000}, function(){
                    layer.close(index)
                    window.location.reload()
                });
            });
        });
    }



    //引用
    function yinyong(it) {
        ue.setContent('')
        var strTop=it.parent().parent().parent().prev().find('span').html()
        var str=it.parent().prev().html()
        if(str==''){
            str=it.parent().prev().prev().html()
        }
        ue.ready(function () {
            ue.setContent('<div id="yin" style="border: 1px dotted  #000;">'+'<div style="font-weight: bold">引用&nbsp;&nbsp;&nbsp;'+strTop+'</div>'+str+'</div>', true);
        });

    }

    //点击立即发送按钮
    function saveBbs() {
        var titleName=$('#titleName').val();
        var authorName='${userName}';
        var userId=$('textarea[name="txt"]').attr('user_id');

        var thingRemind=$('input[name="thingRemind"]:checked').val();/*0-提醒本站人员,1-手动选择被提醒人员，2-提醒有权限人员*/
        if(thingRemind==2 || thingRemind=='2'){
            userId='ALL'
        }

        var txt = ue.getContentTxt();
        var html = ue.getContent();
        var attach = $('.Attachment td').eq(1).find('a');
        var aId = '';
        var uId = '';
        for (var i = 0; i < $('.Attachment td .inHidden').length; i++) {
            aId += $('.Attachment td .inHidden').eq(i).val();
        }
        for (var i = 0; i < $('.Attachment td .inHidden').length; i++) {
            uId += attach.eq(i).attr('NAME');
        }



        var data = {
            boardId: boardId,
            subject:titleName,
            authorName: authorName,
            type:type,
            content: html,
            attachmentId: aId,
            attachmentName: uId,
            authorNameTmep:'1', // 1-署名,2-昵称
            nickName:'', //昵称
            toIdStr1:userId,
            toIdStr2:userId,
            parent:commentId,
            isCheck:function () {
                //判断是否需要审批1,需要审批，0不需要
                if (isCheck==1){
                    return '0';
                }else{
                    return '9';
                }
            }(),
            remind:function(){
                if($('.remind').prop('checked')==false){
                    return '0';
                }else {
                    return '1';
                }
            },
            smsRemind:function(){
                if($('.smsRemind').prop('checked')==false){
                    return '0';
                }else {
                    return '1';
                }
            }
        };

        if ($('.barText').html() != '' && $('.barText').html() != "100%") {
            layer.msg('附件还未上传完毕！', {icon: 2});
            return false;
        }

        var index= layer.load(0, {shade: [0.2, '#ffffff']});
        $.ajax({
            type: 'post',
            url: '/bbs/addCom',
            dataType: 'json',
            data: data,
            success: function (rsp) {
                //关闭
                layer.close(index);
                location.reload();
            }
        });
    }

    var user_id='senduser';
    var ue = UE.getEditor('container',{elementPathEnabled : false});
    UEimgfuc();

    var res;
    $(function() {
        // 查询提醒权限
        $.ajax({
            type:'get',
            url:'/smsRemind/getRemindFlag',
            dataType:'json',
            data:{
                type:20
            },
            success:function (res) {
                if(res.flag){
                    if(res.obj.length>0){
                        var data = res.obj[0];
                        // 是否默认发送
                        if(data.isRemind=='0'){
                            $('.remind').prop("checked", false);
                        }else if(data.isRemind=='1'){
                            $('.remind').prop("checked", true);
                        }
                        // 是否手机短信默认提醒
                        if(data.isIphone=='0'){
                            $('.smsRemind').prop("checked", false);
                        } else if (data.isIphone=='1'){
                            $('.smsRemind').prop("checked", true);
                        }
                        // 是否允许发送事务提醒
                        if(data.isCan=='0'){
                            $('.remind').prop("checked", false);
                            $('.smsRemind').prop("checked", false);
                            $('#thing').parent('tr').hide();
                        }

                    }
                }
            }
        })
        ue.ready(function () {
            var flow_view_str = $.getQueryString("flow_view_str") || '';
            if (flow_view_str != '') {
                var str1 = '<link rel="stylesheet" type="text/css" href="/css/workflow/m_reset.css">' +
                    '<link rel="stylesheet" type="text/css" href="../../css/workflow/work/new_work.css">' +
                    '<link rel="stylesheet" type="text/css" href="../../css/workflow/work/bootstrap.css">' +
                    '<link rel="stylesheet" type="text/css" href="../../lib/laydate.css"/>' +
                    '<link rel="stylesheet" type="text/css" href="../../css/workflow/work/handle.css"/>' +
                    '<link rel="stylesheet" type="text/css" href="/css/dept/roleAuthorization.css"/>' +
                    '<link rel="stylesheet" href="/css/workflow/work/workFormPreView.css?20191210.1"><style>.cont_form{height: auto;}</style><br><br>';
                var str = '';
                if (flow_view_str.indexOf('1') > -1) {
                    str += window.top.opener.document.getElementById("a2").outerHTML;
                }
                if (flow_view_str.indexOf('2') > -1) {
                    str += window.top.opener.document.getElementById("files").outerHTML;
                }
                if (flow_view_str.indexOf('3') > -1) {
                    str += window.top.opener.document.getElementById("Opinion").outerHTML;
                }
                if (flow_view_str.indexOf('4') > -1) {
                    str += window.top.opener.document.getElementById("process").outerHTML;
                }
                ue.setContent(str1 + '<div class="content" style="margin-top:0px;"><div class="cont" style="background: #fff" id="client">' + str + '</div></div><script src="/js/workflow/work/workform.js?20200114.1">\<\/script>', true);
            }
        });
    });

    $(function(){
        $('table').width($(document).width()-100);
        var userId=$.getQueryString('userId');
        var userName=$.getQueryString('userName');
        if(userId != null || userName!= null){  //判断userId或者userName是否为空
            $('#senduser').attr('user_id',userId+',');
            $('#senduser').attr('username',decodeURI(userName)+',');
            $('#senduser').val(decodeURI(userName)+',');
        }else{
            $('#senduser').attr('user_id','');
            $('#senduser').attr('username','');
            $('#senduser').val('');
        }

        if (commentId === undefined ||commentId===''){
            return false;
        }
        //分类
        $.get('/bbs/selectById',{id:commentId},function(res){
            if (res.flag){
                var object=res.object;
                boardId=object['Thislevel']['boardId'];
                type=object['Thislevel']['type'];
                var Child=object['Child'].length;
                if (Child != 0){
                    for (var i=0;i<Child;i++){
                        var str='<tr trname="'+i+'" class="append_tr" style="background: #D9EDF7">'+
                            '<td colspan="2" style="padding-left: 10px;"> ' +
                            '<span style=" margin-right: 20px;">作者姓名：'+object['Child'][i]['authorName']+'</span>' +
                            '<span style=" margin-right: 20px;">部门：'+object['Child'][i]['authorName']+'</span> ' +
                            '<span style=" margin-right: 20px;">'+object['Child'][i]['updateTime']+'</span>' +
                            '<span style=" margin-right: 20px;color: red">'+function () {
                                if(object['Child'][i]['showYn']==1){
                                    return '已屏蔽';
                                }else{
                                    return '';
                                }
                            }()+'</span>' +
                            '</td>'+
                            '</tr>'+
                            '<tr trname="'+i+'">'+
                            '<td colspan="2" style="padding-left: 10px;">'+'<div style="font-weight: bold;margin: 15px 0px">'+object['Child'][i]['subject']+'</div>'+
                            '<p>'+object['Child'][i]['content']+'</p>' +
                            '<div class="tool" name="huifu" style="text-align:right;">' +
                            '<a href="javascript:;" onclick="revert()">回复&nbsp;&nbsp;</a>' +
                            '<a href="javascript:;" aname="'+i+'" onclick="yinyong($(this))">引用&nbsp;&nbsp;</a>' +
                            '<a href="javascript:;" onclick="shield('+object['Child'][i]['commentId']+','+object['Child'][i]['showYn']+')">'+function () {
                                if(object['Child'][i]['showYn']==1){
                                    return '恢复&nbsp;&nbsp';
                                }else{
                                    return '屏蔽&nbsp;&nbsp';
                                }
                            }()+'</a>' +
                            '<a href="javascript:;" onclick="bianji()">编辑&nbsp;&nbsp;</a>' +
                            '<a href="javascript:;" onclick="shanchu('+object['Child'][i]['commentId']+')">删除&nbsp;&nbsp;</a>' +
                            '</div>'+
                            '</td>'+
                            '</tr>';
                        $('table[name="contentTab"]').append(str);
                    }
                }
                /*主内容*/
                var str='<tr class="append_tr" style="background: #D9EDF7">'+
                    '<td colspan="2" style="padding-left: 10px;"> ' +
                    '<span style=" margin-right: 20px;">作者姓名：'+object['Thislevel']['authorName']+'</span>' +
                    '<span style=" margin-right: 20px;">部门：'+object['Thislevel']['authorName']+'</span> ' +
                    '<span style=" margin-right: 20px;">'+object['Thislevel']['updateTime']+'</span>' +
                    '<span style=" margin-right: 20px;color: red">'+function () {
                        if(object['Thislevel']['showYn']==1){
                            return '已屏蔽';
                        }else{
                            return ''
                        }
                    }()+'</span>' +
                    '</td>'+
                    '</tr>'+
                    '<tr>'+
                    '<td colspan="2" style="padding-left: 10px;">'+'<div style="font-weight: bold;margin: 15px 0px">'+object['Thislevel']['subject']+'</div>'+
                    '<p>'+object['Thislevel']['content']+'</p>' +
                    '<div class="tool" style="text-align:right;">' +
                    '<a href="javascript:;" onclick="revert()">回复&nbsp;&nbsp;</a>' +
                    '<a href="javascript:;"  onclick="yinyong($(this))">引用&nbsp;&nbsp;</a>' +
                    '<a href="javascript:;" onclick="shield('+object['Thislevel']['commentId']+','+object['Thislevel']['showYn']+')">'+function () {
                        if(object['Thislevel']['showYn']==1){
                            return '恢复&nbsp;&nbsp';
                        }else{
                            return '屏蔽&nbsp;&nbsp';
                        }
                    }()+'</a>' +
                    '<a href="javascript:;"  onclick="bianji()">编辑&nbsp;&nbsp;</a>' +
                    '<a href="javascript:;" onclick="shanchu('+object['Thislevel']['commentId']+')">删除&nbsp;&nbsp;</a>' +
                    '</div>'+
                    '</td>'+
                    '</tr>';

                $('table[name="contentTab"]').append(str);
                $('table[name="contentTab"] td').eq(0).html('['+object['Thislevel']['type']+'] 标题：'+object['Thislevel']['subject']);

                //锁帖
                if(object['Thislevel']['showYn']==='1' || object['Thislevel']['showYn']===1){
                    $('input[name="showYn"]').val("解锁");
                    $('.tool').hide()
                    $('input[name="showYn"]').attr("onclick","showYn(0)");
                }
            }
        });
    });

</script>
</body>
</html>


